
import { loadSecTeachTaskCourseListForTeacherInfo } from "../../../services/teacherSelf"
export default {
  

  namespace: 'evaluationModule',
  state: {
    list: "",
  },

  effects: {
    *getLoadSecTeachTaskCourseListForTeacher({ payload }, { call, put }) {
      let { rows } = yield loadSecTeachTaskCourseListForTeacherInfo({isTeacher:1,order:'asc',page:1,rows:100})
      yield put({
        type:"setList",
        payload:rows
      })
    },

    *fetch({ payload }, { call, put }) {  // eslint-disable-line
      yield put({ type: 'save' });
    },
  },

  reducers: {
    setList(state, { payload }) {
      state.list = payload
      return { ...state, ...payload };
    },
    setCourse(state, { payload }) {
      state.course = payload
      return { ...state, ...payload };
    },
  },

};
